package com.lv.phuotbacnam;

import android.app.Application;
import android.content.Context;

import com.lv.phuotbacnam.bl.log.Logger;
import com.parse.Parse;
import com.parse.ParseFacebookUtils;
import com.parse.ParseUser;

/**
 * KickOn Application component
 */
public class OurApplication extends Application {

	private static Context context;

	@Override
	public void onCreate() {
		super.onCreate();
		context = this;

		// Initialize parse
		Parse.initialize(this, getString(R.string.parse_app_id),
				getString(R.string.parse_client_key));
		ParseFacebookUtils.initialize(getString(R.string.facebook_app_id));

		ParseUser.enableAutomaticUser();

		// Initialize logging
		Logger.initialize(BuildConf.ENABLE_LOGGING);
		Logger.logMessage("APP STARTED");
	}

	/**
	 * Get application context
	 * 
	 * @return App context
	 */
	public static Context getContext() {
		return context;
	}
}
